use tinySort for sorting