package rewriting pattern changes