refactored lock mechanism