add handleEvent in Server