moved discordance functions into package functions