better page checking