EHN: refactored connection layer