sorting the code