renamed Form1 and implemented handlers