move fields mapping function into W_StructType