added code for computing delta for delta-stepping