refactor, extract md5 invocation