add sample.py
fix some bugs