add lock example