improving event flow