optimize sequence of || with BT