added pthread library