add lock to the tree