init detect_change codes