improved some things. not final graph yet