delete unusde code, and add getpid routine