callback should be called at the end of all recursive calls have finished
adding undefined check for depth
Merge pull request #19 from manjirinamjoshi/master

callback should be called at the end of all recursive calls have finishe...