added function clear() for removing all items from cart