initial hack solution for merge array