digest optimalization