implement class Session next.