updated removePatter()