Added checking to rules