Based on the code snippets from specification draft.