modify bin/expand.py