add optional element as target of the template