added repeat support