moving loadPage to subfunction