program now supports a csv input