update for avoiding deadlocks