Hash function modified