updated graph lib and its api, examples are in main.py