some formating and adding digest as lib