removed unused use
added order by method and test cases