implement readFile