some refactoring of water