draw graph implemented