Remove the grammar mistakes from the following text.
In the same way a secret agent has to be able to take risks when required.
In the same way, a secret agent has to be able to take risks when required.