tweak stringRepeat, after writing unit test