first round, all except implementing last method
first round complete
changed sort element using the key explicity