avoid unnecessary recursion