general changes to get scripts working