writes to file now for assignment