added connection pool
mini refactoring