re-implementation of differential_ani