tweak resolve; pass getSession in instead of calling from scope