Simple Hash function implemented