improved vector class