small change to imfuncs.py