updated for FreeBSD 10