handling data messages on server side implemented