added crossfade functionality