implemented the readFromFile method for storage class.