rewrite the session access mode, and asynchronous implementation