Added vector.c and has been tested