some script tidying
early version of script to make datacards