Update threaded version with version that takes cli arguments