implemented CSV output, modular system for adding more output types as needed.