fully working code, final revision, updated comments, cleaned up formatting, ...SUCCESS! :D :D :D