started making changes to use instance variables from the controller instead of the view