fisrt commit almost complete the basic graphical functions