petea - defined offchange function