removed constraint that array has to be even-sized