Added getField method to get the fields.