modified main program to launch preinit calculations