renamed addRule to addTextRule