improve libc abstraction