moved connection into initializer