changed the sort function.
Merge pull request #6 from margipat/development

changed the sort function.