adding session event handler