made changes to getNumLastTaskOnPage