sort feature

Implemented sort feature