Move the creation of the graphic tag to a separate method