add condition to page turn