pass session by setter to ease testing