fields/2,3 and ext_fields/2,3 functions implemented