Initial (non-tested) implementation.