attempted to add in fwrite functionality. sort of failed, but there is
input being accepted by the file.