add depth limit for prettyprint