correct parsing of payload