modify outputs for writing