fixed layout, corrected arrays, version 0.4