handle session