implement the missing memcmp