refactor message crafting
fix bug, when some keys from expectation are ignored