made it write to a file