included unistd explicitly to fix compile error on other machines