use block in sort method