improve methods of adding script