getting the code in order