add csv mode and frequency ordering (day/min/sec)