a simple, working, yet undocumented version