changed std:vector to primitive array