removed _mkBlanks and introduced generic repeat function