remove recur call in non tail position