refactor ShoppingCart.add