change pagination to only use offset and limit