add file I/O
fully feature complete