simple rewrite using type inference
modular