creates addChild functionality of match