Innovating to benefit from comparative advantage