simplify fstring to cstring
clean up main program
clean up main program