completely recoded water.py to be more dynamic