GEE rebased from kshedden