updates to DRY up some of these scripts