move events into namespace