progress with new api
change api again, handle max depth and stop on circular as options