updated from onEvent to onClientEvent