Implemented first approach for vectors of pointers