refactor; fix bug with shared session state accross instances
refactor: helper methods to a trait