changed the way files are read, data is now transported via a struct, makes encapsulation easier and diminishes errors