don't hard-code max pages