implement new serial protocol
add documentation