vector implementation