this one was correct, and wrong for posix atm