gettime and getpid added