is it safer to make a copy of the given vector, instead of taking a pointer?