changing vector array into a global