Works for arrays of length 2