updated with lock control