Fixed to use 2 arrays.