type correct removeRecursively