add serial vector and move stuff to testing function