first attempt for 2 pass digest

Filter out

Test case added

Adding test case for the static ref update and bug fixes