implemented better graph visualization