before client instance