fixed output problem when using data() and created .txt files for submision.