class is now instantiated with a text file