added base code for error clustring estimates