optimization of startup routine