major update: bug fix on delta calculation