add flip page logic