Add rules.cpp