modifications to readFile