implement a naive connection pool