cleanup
made depth a mandatory constructor parameter