Add test for vector. Implement tree for vector