added calculation by differential algorithm