added toPatches logic