Rewrote readFiles