for consistency use memcpy/memset everywhere instead of bcopy/bzero