added mock ad and some connection pool changes