init vecs and did some memory managament