sentence1: He moved to Morocco 1239 / 40 ( after the fall of Valencia in 1238 ) and continued to work for the sultan there .
sentence2: He moved to Valencia in 1239/40 ( after the fall of Morocco in 1238 ) and continued to work for the sultan there .