change deprecated Hash method