use memcmp instead of ==