now with command line arguments
cleaned up and with .csv parsing