functions added to cart controller