move functions out of connection record