Added apple logic.