Breakdown of Er improvisiert, um den Spiegel statt des Regals zu befestigen.
er
he
um
at (time)
das Regal
the shelf
der Spiegel
the mirror
Questions & Answers about Er improvisiert, um den Spiegel statt des Regals zu befestigen.
Why is it des Regals and not das Regal?
The preposition statt (instead of) requires the genitive case. Since Regal is a neuter noun, its genitive article is des and it gets an -s added to the end of the noun, making it des Regals.
Why is den Spiegel in the accusative case while des Regals is in the genitive?
den Spiegel is the direct object of the verb befestigen (to attach), so it takes the accusative case. However, des Regals immediately follows the preposition statt, which forces it into the genitive case regardless of what the rest of the sentence is doing.
What is the purpose of um and zu in this sentence?
The structure um ... zu means in order to. Here, it connects the main action (Er improvisiert) with the goal. The infinitive verb befestigen always goes at the very end of the um ... zu clause.
Could I use anstatt instead of statt here?
Yes! statt and anstatt mean exactly the same thing (instead of) and both require the genitive case. You can use them interchangeably, so anstatt des Regals would also be perfectly correct.
Why does come after ?