partially tested and implemented payload creation