Implement hash changing logic