In an isothermal expansion of an ideal gas, an amount of work $W=\int p d V$ is done by the system on its surroundings. The internal energy $U$ of the gas does not change, because the system draws in heat $Q$ from a reservoir, and for an isothermal process in an ideal gas, $U$ remains constant. Since $\Delta U=0$ we have $Q=W$. So in this process, heat has been drawn from a single reservoir, and an equivalent amount of work has been done, 'turning' the heat totally into work. Is this a violation of the Kelvin statement of the second law?