parse AD and CD