modified client code