add line to check what 'tagname' actually is at this point