add unit test for message interleave; clean code