removed unnecessary reconnect function