fully implemented vector class