added header and footer to output, separate output for +/-/0