implements file I/O
fix conflicts