update. single threaded is working good