added createSessionConn function.