DeadLock class submmittd by Chen