Transfered thinking.py code over to GPSpython.py