Version 2

Script is working as expected with 1 minor bug that does not effect the
way the script works.