refactored some rules