improved payload generation