rules code commented