removed the misplaced index method from the model and put the instance var in the controller