fixed bugs after switching to pointer to vector