Array builds, but checkRepeat is incomplete