Adding factory method to Connection