renamend onlock comit defun