write resize vector fn, change all occurances to use this.