initial script, time to code
added function def
Notes for nick
Worked on this abit
modded