saving card state changes