save patterns on change