added invalid cart functionality