add rule checking