fixed example for new session API