fixing array order