enhance the session calculation