used reserve instead of resize