implemented strncmp