handling card visibility