fix some bugs
do some tests for PY