inlining delta and inversedelta