remove pthread dependency