efficient vector implementation