simplified code for establishing connection