fix #3 calculate from python code
fix #3 calculate from python code