2nd way to compute hermitian distance added