replace local function with third-party library function