using JSON.stringify to create JSON payloads
updated docs to match updated code