reduce system calls to improve performance