3 arrays full code