Creating patch class