multiple extensions check optimized