fix bug and add ig.py