refactoring for cart add, email recognition, pagination, etc.