improve dictionary.m: use strncmp