Changed method call to getElementsByTagName