Could we just add contents of the class attribute here so we don't have to loop over them again after?