change setResult to setPayload