changed the get element by id to get elements by class name with an id