example for type inference