Added more tests + a sort option