trying to see more about handled events, restructured code