add function that cannnot turn page if current
page is the fisrt or last.