Updated MD5 method and added test case