added context to rules