switch to event based thingy