add a condition for including the anchor