off-by-1 in repeatedly