An efficient algorithm for implementing the perfectly matched layer (PML) is presented for truncating finite-difference time-domain domains. The algorithm is based on incorporating the auxiliary differential equation method into the PML formulations. Simple, unsplit-field and material independent PML formulations are obtained. Two dimensional numerical examples are included to validate the proposed formulations.