added new session logic