first draft of the prototype code