changed function type inference