add count-change function