added peekDepth function Fixes #1