use sessionModes in place of getModes