cycle array to save space