Add max-depth to control the amount of lookup