implemented fidelity similarity and his test