work on serial protocol, better unittests, more exceptions