fixed writer, arrayify works, test passes