implemented a connection pool