added events to controls