Many thanks to Al Sweigart for their contribution!