remove needless recursion