better dissonance function