Move initClient down into a where clause