added requirejs compatibility