test depth() method
implement depth() method
put newlines in json output