creating smarter cart