moved the file parser to model and added instance variable