First workable revision (including code and examples)