decode to an array