minor optimization : creation of lastPage