implement depth limitation with the /recurse=<depth> flag