initial version of digest funciton