updated input file as a param and added a few comments