rearrange type fields,check for NP