Polished the code of the function "patches"