reworked output protocol
partially updated client.py for new output format