implement rule base