added array resize function

to increaze the size everytime something gets inserted