file input basically working, need to fix iteration over input file and make output function