added alert and modified client and init