final mods to make a cronable shell script which can be run every 5 minutes or so