Resize aborting program, need to use malloc imo and declare as dynamic at beginning