equation formula added; multithreading improved