used strncmp instead of mystrcmp at several places