There is exactly one pending write in this state, so why is this needed? And if it's not guaranteed to have a pending write in this state, then why can we use pendingWrite on line 76?