use define create scripts, call them with require instead of script.src