flesh out the init and digest functions