sparse vector implementation