refactored hash to default to 0