move rule to pig.h