apply document.getsession and project.