attempts to generalize the recursive methods in sia.