~~~~~~~~~~~~~~~~~~~~~~~~~~
Ported to 83+ by S. Megrim
thanks to Emir Sakic
~~~~~~~~~~~~~~~~~~~~~~~~~~