better extension handler