added validation to the cart etc.