move some code to separate function
fix build-approx-patterns-two-way: return separate forward/revc patterns