Array format

rebased version of #20