compute delta