update interpose

A faster implementation of the `interpose` function.