Revised the threaded version to latest version.