add max retry config to main file; prototype multithread support