added repeat, deferTicks functions