performance improvements with md5 (all loops)