reworked the session structure and limits