Updated gwFunctions.py