code sketches, structure outline and types for protocol handling