optimize imports and remove env check