finally got it. just had to pass in a pointer to the array and then rather than use the array itself just have it point to a new array. may change this to just use one array but at least it works