Added NextPage functionality