abstracting code into functions in order to be able to read the .json files too
support CSV and JSON files