added get order by status function