implement value restriction instead of all the previous logic for mutability