implemented templates in vector class