WIP: rewriting connection_pool using StateT