created a smarter cart