split up initialization stuff