add to lock keyword function