Changing client to global variable