changing code back to creating connection every 30sec.