before switching to ready queue
all events are handled but lots of bugs remain