Flipping and flip counter working