add beginPtr, to make vector address taking safe