fixed minor bug in estimation of delta; removed some old code that isn't used anymore