linking with pthread