hude refactor