added the AP conversion functionality.