challenges with type inference