rewriting a simpler replacement for https://github.com/triggity/kasparov