Updated fading function