correct BSD code