updates for error handling and comm protocol