added connection pool and json output