Working on type inference