implement end to end HES api wrapper