refactoring basket