pulling changes from legacy AOSPA