add basic lock method