added repeat NONE|ONE|ALL function