refactored md5