partial md5 implementation