reordering
support for finished message
add some state
some more stuff