added connection pooling for photos