fixed getElementByClassName function