added readFile method