minor changes to ap()