updated refence and compare script