code structure change and python example can eat apple now!