more work to simplify specification of residual type and bw selection method