move connector to constructor