added default param to goalDef function