adding sort by usage feature

Please review and commit