refactored oap routine: buffer pointer