This is example code that still needs some work. Thanks to Tymm Twillman for sharing it.