2pass bit vector working. it's slow, but was very simple to implement