Added ORDER BY functionality