initialize result arrays with type