add lock mechanism