fix to avoid opening too many connections to db. Pool now providing one connection per thread rather than per method call.