changed ordered by to sorted by