reorganize order of events on init