An implementation of an idea I borrowed from Rob Rix https://github.com/robrix