refactor unflood improvements