compile rules