add cached version of getScript