started threading in main