moved card visibility code to right function :P