refactoring on water source