impl refactor es into config for production