removed unused code

removed unused code $patterns