Remove that nasty recursion.