Assignmment based type inference FIRST TRY