added orderByAscending and orderByDescending API