write rules