added parser class to deal with the input file