implemented decode for Message codec