better here to check for fields.length === 0 is clearer