optimization to make faster in firefox