abstract out the running of scripts