Assignmment based type inference !!AMEND ME!!