Thank you jeff-themovie for this implementation!
This reverts commit ba89c891768b371e5358af4cdc76ff18e8b37672.