work out the connector function