Added some code for reading from file