fixed javascript with new element names