some refactoring of basket spec