fixed sorting and modified change location