Working on rule checking