moved ese functionality to es