Abstract the connection example