improve expressions type inference