replaced FillLocationtiles with BinarySort