function for calculating delta values created.