fix inferType - now it uses unify properly (hopefully)