passing in attributeName instead of initial found index to getAttributeIndex