Added some card flipping logic