initial card flipping implementation