added include unistd.h