new attempt to support locking