added ability to define already loaded scripts