add typename to fields