first attempt for 2 pass digest

Adding test case for the static ref update

Please let make know if this can be considered a general scenario that could be merged into the main branch?

Thanks.