https://www.charliefrancis.com/blogs...g-into-trouble

Decide for yourself if you want to reinvent the wheel.