update for multiple threads;