add getDepthWithLimit
Merge pull request #15 from sergshabal/master

add getDepthWithLimit