added the show-depths method using lexical closures