fixed some bugs for api, and add more examples in example.py.