updated the cart functionality