use pointer instead of shared_ptr in session module