APE implementation