changes for the HvsH with agent's option