combine cart and refactoring