take pains to

take (great) pains to do something

also go to (great) pains to do something
to try very hard to do something We took great pains to insure that no one felt left out.
Related vocabulary: go to great lengths to do something
See also: pain, take