Replaced hash with database