better pages handling