go to great pains
US /ɡoʊ tə ɡreɪt peɪnz/
UK /ɡoʊ tə ɡreɪt peɪnz/

1.
to make a great effort to do something, especially to ensure that it is done well or correctly
:
•
She went to great pains to make sure all the guests were comfortable.
•
The author goes to great pains to explain complex scientific concepts in simple terms.