changed message formate to JSON
fixed IP selection