next page function and several test