add result type inference