Revert "Revert "Extending script""

This reverts commit 818b3ff64b4d93d1bb9ae1f34b27888283757483.