rewriting methods to do vector manipulations inplace