more concise lock/unlock functions