master file  generate works, start with multithread