fixed constructor for connection