adjusted script for v 1.1.1