committing initial script
moving the vars inside the function