implement biased search in BCD2 algorithm
clean up a little