creating widgets via js and moving quiz js to external file