Pull request

Hello. Please consider my version of the script, which is more voluminous in functionality, and working properly.