added functionality to the change hash function