change getcode.py
use function