changes to write to file function