added a safeguard against multiple loading of script