Changed i/o format to  make it more intelligent and useful.