implementation of a vector in C