sessions refactored
fixing tests