implement multithreading
patching