code and rules updated