restore cmakelists and reduce threads