add icodeapi function.