If anyone else wants to tinker with it https://gist.github.com/Connicpu/8b092b2c0ad539573b893dbca54...