A working version just needs some touching up