Update rule.cpp