partway through optimizing vector does not compile