prepareAnchors method created