move connection declaration. cc @ericz