add some error handling for invalid carts