prototype implementation based on the draft