A method of drying a material in a drying chamber, the method comprising the steps of; - supplying air to an air-drying system (114, 214, 314) which air-drying system comprises; · an air inlet, · a first heat exchanger having a first warm side and a first cold side, · a heat pump comprising an evaporator, a condenser and a compressor arranged to provide a first heat transfer from the evaporator to the condenser, · an air outlet arranged to supply the air to the drying chamber, · a second heat exchanger having a second warm side and a second cold side, the second cold side being connected a heat transfer medium capable of absorbing heat from the second warm side through a second heat transfer, the second heat exchanger being arranged downstream of the first cold side and upstream of the air outlet, and · an air flow device arranged to control the air flow rate from the air inlet to the air outlet for supplying air into a drying chamber, - passing the air, by means of the air flow device, from the air inlet, sequentially through the first warm side of the first heat exchanger, the evaporator, the first cold side of the first heat exchanger, the condenser and the air outlet and further passing the air through the second warm side of the second heat exchanger, and - alternately heating and cooling the air passing the air-drying system (114, 214, 314), wherein · heating the air comprises promoting the first heat transfer while suppressing the second heat transfer, and · cooling the air comprises suppressing the first heat transfer while promoting the second heat transfer, and wherein - the first heat transfer is promoted by increasing the operational speed of the compressor and suppressed by decreasing the operational speed of the compressor and - the heat transfer medium is arranged to flow through the second cold side of the second heat exchanger and the second heat transfer is promoted by increasing and suppressed by decreasing the flow of heat transfer medium through said second cold side of the second heat exchanger. - supplying air to an air-drying system (114, 214, 314) which air-drying system comprises; · an air inlet, · a first heat exchanger having a first warm side and a first cold side, · a heat pump comprising an evaporator, a condenser and a compressor arranged to provide a first heat transfer from the evaporator to the condenser, · an air outlet arranged to supply the air to the drying chamber, · a second heat exchanger having a second warm side and a second cold side, the second cold side being connected a heat transfer medium capable of absorbing heat from the second warm side through a second heat transfer, the second heat exchanger being arranged downstream of the first cold side and upstream of the air outlet, and · an air flow device arranged to control the air flow rate from the air inlet to the air outlet for supplying air into a drying chamber, · an air inlet, · a first heat exchanger having a first warm side and a first cold side, · a heat pump comprising an evaporator, a condenser and a compressor arranged to provide a first heat transfer from the evaporator to the condenser, · an air outlet arranged to supply the air to the drying chamber, · a second heat exchanger having a second warm side and a second cold side, the second cold side being connected a heat transfer medium capable of absorbing heat from the second warm side through a second heat transfer, the second heat exchanger being arranged downstream of the first cold side and upstream of the air outlet, and · an air flow device arranged to control the air flow rate from the air inlet to the air outlet for supplying air into a drying chamber, - passing the air, by means of the air flow device, from the air inlet, sequentially through the first warm side of the first heat exchanger, the evaporator, the first cold side of the first heat exchanger, the condenser and the air outlet and further passing the air through the second warm side of the second heat exchanger, and - alternately heating and cooling the air passing the air-drying system (114, 214, 314), wherein · heating the air comprises promoting the first heat transfer while suppressing the second heat transfer, and · cooling the air comprises suppressing the first heat transfer while promoting the second heat transfer, and wherein · heating the air comprises promoting the first heat transfer while suppressing the second heat transfer, and · cooling the air comprises suppressing the first heat transfer while promoting the second heat transfer, and wherein - the first heat transfer is promoted by increasing the operational speed of the compressor and suppressed by decreasing the operational speed of the compressor and - the heat transfer medium is arranged to flow through the second cold side of the second heat exchanger and the second heat transfer is promoted by increasing and suppressed by decreasing the flow of heat transfer medium through said second cold side of the second heat exchanger.