some little code to display graph