cleaned up, checked output files, added function to do checking for no solution