refacto hash