more working egprocess. with debug statements