complete redo of the source, version 1.1