Added option to let the tag defined by the result of a function