added a _vectorMap() helper function