applying patches