forgot to uncomment sorting code