factored shopping cart service to be a closure with addToCart method