initialize mode switch event in constructor