added allowEmpty