update compare with reference