changed the code to write to multiple hardcoded files