simple and easy code that captures the depth and filter the values