recognize end of session