added thread main
merged