adapt dispatch refactoring for libc namespace