tweaked postMessage