changed session createInstance to static method