refactor water