relace vector with ArrayList