updating new aapi sample