added function to generate md5