add example for birch + make it more pythonic