linear reverse recurse