Add code to to prevent unnecssary method calling in pyteaser.py