added withES which ends an es acrion with a shutdown