prevpage and nextpage setup