implement conn/close