added tgree d plot code