move client to global (fix later)