change detecting rules and add test