making the script do something + refactor