added searching and synchronization for multithreaded updates