preventing an infinite recursion