fixed

changed contents[i] stuff to contents.at(i)