A working version.