Add digest-function and add iteration limit (set to 10)