improved use of require js