Changed the method of connect, and build table in html