add readFile method