scheduler integrated in main