added helper Lock and Unlock functions to the object interface