implement alpha switching (could be refactored into alpha-blending)