Formula for past continuous tense of active and passive voice?

Formula for past continuous tense of active voice:

Subject + was/were + present participle

Example:
I was eating lunch when the phone rang.

Formula for past continuous tense of passive voice:

Subject + was/were + being + past participle

Example:
The cake was being baked when the power went out.