updated model w hash function