rather use a class for the cart
refactor as cart as class