re-arrange stream, array