modify for FreeBSD