rules's implementation