more code into handleMessage()
merge