using channels to make a connection pool