A very basic (but working) implementation.