try declaring establishConnection globally