checked test output and small fixes for my old gcc
draw graphs