added allow empty. and rename self.fields