replaced init in main