sorting

sorting was done and now the program prints everything in order