script to run the whole lot from scratch