Tweaked this to use a single script, rather than multiple