added basic page recognition