added ap stuff