replace ~[] with Vec<>