let hooking arrays of events, some code cleanup