first complete draft, not yet tested