add smart functional in cart