First fully-functional (but untested) version