ticket:3 added sorting