added lock as lib