added multi_threading for logcal. test passes but speed gain untested