use LockMode enum for mode