Water law in relation to environmental quality