added more sorting functions