update Inbound script according to new format