added number output mode and eof terminating option