update so that I can use at work too, tidy up old stuff a little