configs and two-phases search added.