add function added to Cart class