rules class