equal function for two strings