change words postion after sorting