moved some code to LockUtils statics