page count should be from 1 onward not 0.
the more var is never changed from true val so useless.