A new algorithm has been developed for simulating the amplification of femtosecond pulses in fiber amplifiers, for example. It allows one to properly describe both the time dependence due to gain saturation and the frequency dependencies of optical fields and gain. The details have been published in the open-access journal Optics Express.