moving connection into class loading