Rethinking water law: from principles to water codes