added multithreded updating