add some md5 caculation and history loading/saving routines